<template>
  <div class="swiper-container">
    <div class="swiper-wrapper">
      <div class="swiper-slide">
        <img src="@/assets/banner.jpg" alt="">
      </div>
      <div class="swiper-slide">
        <img src="@/assets/banner.jpg" alt="">
      </div>
      <div class="swiper-slide">
        <img src="@/assets/banner.jpg" alt="">
      </div>
    </div>
    <div class="swiper-button-prev"></div><!--左箭头-->
    <div class="swiper-button-next"></div><!--右箭头-->
  </div>
</template>

<script>
    import Swiper from 'swiper'
    import 'swiper/dist/css/swiper.min.css'
    export default {
      data(){
        return{

        }
      },
      mounted() {
        var mySwiper = new Swiper('.swiper-container', {
          autoplay: false,
          loop: true,
          navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
          }
        })
      }
    }
</script>

<style scoped>
  .swiper-container{
    height: 200px;
    border: 1px solid #CCC;
  }
  .swiper-container img{
    height: 200px;
    width: 100%;
  }
</style>
